<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
   <h:head>
          <title>选择组件示例</title>
   </h:head>

   <h:body>
        <h:form>
         <h:panelGrid columns="2">
           
           喜欢的车型
           <h:selectManyMenu value="#{form.lovestyle}" >
               <f:selectItems value="#{form.carStyles}" var="w"
                              itemLabel="#{w}" itemValue="#{w}"/>
            </h:selectManyMenu>
          
           喜欢的颜色
            <h:selectManyCheckbox value="#{form.colors}">
               <f:selectItems value="#{form.colorItems}"/>
            </h:selectManyCheckbox>
            喜欢的品牌
            <h:selectManyListbox size="5" value="#{form.cars}">
               <f:selectItems value="#{form.carItems}"/>
            </h:selectManyListbox>
            姓名
            <h:inputText value="#{form.name}"/>
           订阅本站消息
            <h:selectBooleanCheckbox value="#{form.contactMe}"/> 出生年份
            <h:selectOneMenu value="#{form.yearOfBirth}" required="true">
               <f:selectItems value="#{form.yearItems}"/>
            </h:selectOneMenu>
            教育程度
            <h:selectOneRadio value="#{form.education}" 
                              layout="pageDirection">
               <f:selectItems value="#{form.educationItems}"/>
            </h:selectOneRadio>
         </h:panelGrid>
         <h:commandButton value="提交" action="selectresult2"/>
      </h:form>
      <h:messages/>
   </h:body>
</html>

